package com.ssy.lingxi.member.merchant.controller.web;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.config.ServiceConfig;
import com.ssy.lingxi.member.merchant.service.web.IMemberCommentScheduleService;
import com.ssy.lingxi.scheduler.api.model.ScheduleTaskCallbackVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 定时任务订单评价回调controller
 * @author yzc
 * @version 2.0.0
 * @date 2021/8/11
 */
@RestController
public class MemberCommentScheduleCallBackController {

    @Resource
    private IMemberCommentScheduleService memberCommentScheduleService;

    /**
     * 定时模块自动评价订单回调
     * @param callbackVO 接口参数
     * @return 返回结果
     */
    @PostMapping(ServiceConfig.ORDER_COMMENT_CALLBACK_URL)
    public Wrapper<Void> autoCommentCallBack(@RequestBody ScheduleTaskCallbackVO callbackVO) {
        return memberCommentScheduleService.autoCommentCallback(callbackVO);
    }
}
